#include <iostream>
#include <stdlib.h>
#include <string>

using namespace std;

class Employee{
public:
    Employee(){};
    Employee(string id,char n, int b, int s):identity(id), name(n),basic(b),sell(s){};
    void csalary()
    {
        salary=basic+sell*commission;
    };
    void commissionset(int c)
    {
        commission=c;
    };
    void show()
    {
        cout<<identity<<name<<basic<<salary<<endl;
    };
private:
    int basic,sell,commission,salary;
    string identity;
    char name;
};

int main()
{
    Employee employee[3]={Employee("sx0001",'lk',5000,60),Employee("sx0002",'ll',4000,70),Employee("sx0003",'ly',6000,90)};

    for(int i=0;i<3;i++)
    {
        employee[i].commissionset(100);
        employee[i].csalary();
        employee[i].show();
    }

    system("pause");
    return 0;
}
